]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
polKitAgent: Don't crash when we cannot enable/disable the auth agent
authorAdel Gadllah <adel.gadllah@gmail.com>
Sun, 4 Nov 2012 10:53:22 +0000 (11:53 +0100)
committerAdel Gadllah <adel.gadllah@gmail.com>
Tue, 19 Feb 2013 16:25:53 +0000 (17:25 +0100)
This makes it easier to run with jhbuild.

https://bugzilla.gnome.org/show_bug.cgi?id=687556

js/ui/components/polkitAgent.js

index d38dcdff4dd906ca9a335ae1834eabc9a20dbc08..929b43e69e23577901865baef0c88da9c4301345 100644 (file)
@@ -335,11 +335,19 @@ const AuthenticationAgent = new Lang.Class({
     },
 
     enable: function() {
-        this._native.register();
+        try {
+            this._native.register();
+        } catch(e) {
+            log('Failed to register AuthenticationAgent');
+        }
     },
 
     disable: function() {
-        this._native.unregister();
+        try {
+            this._native.unregister();
+        } catch(e) {
+            log('Failed to unregister AuthenticationAgent');
+        }
     },
 
     _onInitiate: function(nativeAgent, actionId, message, iconName, cookie, userNames) {